<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html dir="ltr" lang="en-gb">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>管理员界面</title>
<link type="text/css" rel="Stylesheet"
	href="/PCT/StyleAll/styleLogIn.css" />
<link type="text/css" rel="Stylesheet" href="/PCT/StyleAll/styleAll.css" />
<script type="text/javascript">
	function exit_confirm() {
		var r = confirm("您确认要退出病友互助社区吗");
		if (r == true) {
			window.close();
			window.open("login.htm");
		}
	}
</script>
<style type="text/css">
.STYLE1 {
	font-size: 36px
}
</style>
</head>

<body class="browser-webkit can-transform has-shadows transform">
	<div class="header">
		<a> <img src="/PCT/image/Logo Small.png" width=1000px height=50px
			alt="Logo Small">
		</a>
	</div>
	<p>&nbsp;</p>
	<div class="page">
		<div id="page-header">
			<div id="search-box">
				<s:if test="#session.status.currentUser.userType == 1">病友：</s:if>
				<s:elseif test="#session.status.currentUser.userType == 2">医生：</s:elseif>
				<s:elseif test="#session.status.currentUser.userType == 3">管理员：</s:elseif>
				<a><span><s:property
							value="#session.status.currentUser.username" /></span></a> <a
					href=" <s:url action='logout' namespace='/secure'/>">退出</a>
			</div>
			<form id="search" name="search" action="/PCT/public/search.action"
				style="display: inline">
				关键字：<input name="target" type="text" /> <select name="searchType">
					<option value="post">搜索帖子</option>
					<option value="topic">搜索主题</option>
					<option value="group">搜索群</option>
				</select> <input type="submit" value="GO" class="button2" />
			</form>
			<%-- <a href="<s:url action='redirectResult' namespace='/public'>
							<s:param name='redirectType' value='1' />
						 </s:url>" class="button2">注册</a> --%>
			<a href="<s:url action='exportSheet' namespace='/public'> </s:url>"
				class="button2">导出数据</a>
		</div>
		<div id="page-body">
		<h2>&nbsp;</h2>
		<h2>用户管理</h2>

		<table>
			<tr>
				<td>用户名</td>
				<td>用户类型</td>
				<td></td>
			</tr>
			<s:iterator value="userList" var="user" status="itStatus">
				<tr>
					<td><s:property value="username" /></td>
					<td><s:if test="userType==1">病友</s:if> <s:elseif
							test="userType==2">医生</s:elseif> <s:else>受限</s:else></td>
					<td><s:if test="userType>9">
							<a
								href="<s:url action='bleachUser' namespace='/public'>
										<s:param name='userID' value="#user.username"/></s:url>">解除限制</a>
						</s:if> <s:else>
							<a
								href="<s:url action='blackenUser' namespace='/public'>
										<s:param name='userID' value="#user.username"/></s:url>">加入黑名单</a>
						</s:else></td>

				</tr>
			</s:iterator>
		</table>
	</div>
	<div class="footer">
		<div class="copyright">
			<p class="copy-left">上海交通大学 软件学院</p>
			<p class="copy-right">
				设计风格 <a href=" http://www.artodia.com/">Artodia</a> 。
			</p>
		</div>
	</div>
</body>
</html>
